package china.nanjing.mykingdom.common;

import org.springframework.cloud.stream.annotation.Input;
import org.springframework.cloud.stream.annotation.Output;
import org.springframework.cloud.stream.binder.PollableMessageSource;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.SubscribableChannel;

/**
 * @author Chen Hongyu
 */
// https://docs.spring.io/spring-cloud-stream/docs/current/reference/htmlsingle/#spring-cloud-streams-overview-using-polled-consumers
public interface EnvoyMQ {

    String ENVOY_OUT = "envoyInput";
    String ENVOY_IN = "envoyOutput";

    @Input(value = ENVOY_IN)
    SubscribableChannel destIn();

    @Output(value = ENVOY_OUT)
    MessageChannel destOut();

}
